/*
 * @Description: 数据库连接
 * @Author: wangqi
 * @Date: 2024-07-25 21:56:15
 * @LastEditTime: 2024-07-26 11:34:03
 * @LastEditAuthor: wangqi
 */

const mysql = require("mysql");

const db = mysql.createConnection({
  host: "localhost",
  user: "root",
  password: "root",
  database: "account_blibli",
});

module.exports = {
  db: db,
  info: {
    sucess: function (data, message = "") {
      return {
        state: true,
        message,
        data,
      };
    },
    error: function (message = "") {
      return {
        state: false,
        message,
      };
    },
  },
};
